package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;


public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);

        osw.write("如果你突然打了一个喷嚏，啊，那就是我在想你");
        osw.write("你突然被手机吵醒，那一定是我关心");

        System.out.println("输出完毕");
        osw.close();
    }
}
